<template>
  <div class="consultation-pending">
    <el-card shadow="never">
      <template #header>
        <h2>待参加会诊列表</h2>
      </template>
      
      <el-table :data="pendingData" stripe>
        <el-table-column prop="patientName" label="患者姓名" />
        <el-table-column prop="consultationTime" label="会诊时间" />
        <el-table-column prop="departments" label="参与科室" />
        <el-table-column prop="status" label="状态" />
        <el-table-column label="操作">
          <template #default="{ row }">
            <el-button type="primary" size="small" @click="handleJoin(row)">加入会诊</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { ElMessage } from 'element-plus'

const pendingData = ref([
  {
    patientName: '张三',
    consultationTime: '2024-01-16 14:00',
    departments: '内科、肿瘤科',
    status: '待开始'
  }
])

const handleJoin = (row: any) => {
  ElMessage.success(`加入会诊: ${row.patientName}`)
}
</script>

<style lang="scss" scoped>
.consultation-pending {
  h2 {
    margin: 0;
    color: #303133;
  }
}
</style>